Fix API login after I7c957e1e
authorBrad Jorsch <bjorsch@wikimedia.org>
Fri, 2 May 2014 14:09:40 +0000 (10:09 -0400)
committerBrad Jorsch <bjorsch@wikimedia.org>
Fri, 2 May 2014 14:09:40 +0000 (10:09 -0400)
Prior to change I7c957e1e, API logins were done as if the "keep me
logged in" checkbox was checked. That change altered this for no
apparent reason.

Bug: 64727
Change-Id: I7fcca2a1eabcac3b2c232cd05d9989af85cc3ed0

includes/api/ApiLogin.php

index f2a9d1a..46e2a53 100644 (file)
@@ -86,7 +86,7 @@ class ApiLogin extends ApiBase {
                        case LoginForm::SUCCESS:
                                $user = $context->getUser();
                                $this->getContext()->setUser( $user );
-                               $user->setCookies( $this->getRequest() );
+                               $user->setCookies( $this->getRequest(), null, true );
 
                                ApiQueryInfo::resetTokenCache();